package com.itmayiedu.api.service.impl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.web.bind.annotation.RestController;

import com.itmayiedu.api.service.TestApiService;
import com.itmayiedu.base.BaseApiService;
import com.itmayiedu.base.BaseRedisService;
import com.itmayiedu.base.ResponseBase;
@RestController
public class TestApiServiceImpl extends BaseApiService implements TestApiService{

	@Override
	public Map<String, Object> test(Integer id, String name) {
		Map<String, Object> result = new HashMap<String, Object>();
		result.put("code","200");
		result.put("msg","success");
		result.put("data",new String[]{"123456","259932",id+"",name});
		
		return result;
	}

	@Override
	public ResponseBase testResponseBase() {
		// TODO Auto-generated method stub
		return setResultSuccess();
	}

	@Override
	public ResponseBase setTestRedis(String key, String value) {
		// TODO Auto-generated method stub
		 baseRedisService.setString(key, value,null);
		return setResultSuccess();
	}

}
